home *** CD-ROM | disk | FTP | other *** search
- NAME
-
- Old2ANSI - Convert K&R C source file to ANSI-style prototypes.
-
- SYNOPSIS
-
- Old2ANSI [n-] Oldfile Ansifile [Headerfile]
-
- DESCRIPTION
-
- Old2ANSI changes the function declarations within a C source file to
- the newer ANSI standard prototype method. It will optionally generate
- a header (.h) file containing just these prototypes. This file can then
- be #include'd in the source file so as to avoid compiler warnings
- resulting from functions that are called before having been declared.
- The Headerfile, if generated, is appended with the new prototypes.
-
- The n- flag controls the interpretation of nested comments. If this flag
- is present, then comments may be nested in the form:
-
- /* outer comment /* inner comment */ outer comment */ code...
-
- If this flag is not present, then any one comment terminator terminates
- the entire comment, like so:
-
- /* first comment /* second comment */ code...
-
- BUGS
-
- Pre-processor directives are ignored. This means that odd cases which
- use #ifdef, #ifndef, or #if may give strange results. Also, all function
- declarations that are found in the source file are added to the header
- file because of this. The user must take care to remove any prototypes
- that are not needed because of false #ifdef's.
-
- Type declarations of the following form (used for functions) cause
- a bad prototype:
-
- type[space]more_type[space]more_type
-
- An example of this is:
-
- int (*foo) ();
-
- If the second space is removed, a consistent prototype is generated.
-
- AUTHOR
-
- Dan Wilga GEnie: GRIBNIF
- Gribnif Software Internet: Dan.Wilga@saturn.ucc.umass.edu
- P.O. Box 350 Fax: (413) 584-2565
- Hadley, MA 01035 Voice: (413) 584-7887
-
- Program and documentation Copyright © 1991, Gribnif Software.
-
-